package cn.tedu.demo;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import java.io.Serializable;

public class Stu implements Serializable {

    private String name;
    private String classroom;
    private Integer score;

    @PostConstruct
    public void open(){
        System.out.println("实例化stu");
    }

    @PreDestroy
    public void close(){
        System.out.println("销毁Stu");
    }


    public Stu(){
        
    }

    public Stu(String name, String classroom, Integer score) {
        this.name = name;
        this.classroom = classroom;
        this.score = score;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getClassroom() {
        return classroom;
    }

    public void setClassroom(String classroom) {
        this.classroom = classroom;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    @Override
    public String toString() {
        return "Stu{" +
                "name='" + name + '\'' +
                ", classroom='" + classroom + '\'' +
                ", score=" + score +
                '}';
    }
}
